home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / rsxwdk2s.zip / RSXWDK / LIBSRC / DOS / DOS4401.C < prev    next >
C/C++ Source or Header  |  1994-12-17  |  385b  |  27 lines

  1. #include <errno.h>
  2. #include <sys/doscalls.h>
  3.  
  4.  
  5. /*
  6. ** AH = 0x44 ; AL = 01
  7. ** BX = handle
  8. ** DX = mode
  9. */
  10. int dos_ioctl_setattr(int handle, int mode)
  11. {
  12.     struct REGPACK r;
  13.  
  14.     r.eax = 0x4401;
  15.     r.ebx = handle;
  16.     r.edx = mode;
  17.  
  18.     _intr(0x21, &r);
  19.  
  20.     if (r.eflags & 1) {
  21.     _sys_doserror2errno( r.eax & 0xFFFF);
  22.     return (-1);
  23.     }
  24.     else
  25.     return 0;
  26. }
  27.